package com.GameInterfaceDevelopment.JCheckBox;

import java.awt.*;
import javax.swing.*;

//复选框JCheckBox
//显示Favorite面板对象的窗口
public class JCheckBoxExample extends JFrame {
    public JCheckBoxExample() {
        super("请选择你喜欢的爱好");
        Container container = getContentPane();
        container.setLayout(new FlowLayout());
        Favorite f = new Favorite();
        container.add(f);

        //设置窗口大小
        //pack();
        setSize(300,300);//自定义大小
        setLocationRelativeTo(null);//将窗口置于屏幕中央

        setVisible(true);
    }

    public static void main(String[] args) {
        JCheckBoxExample jc = new JCheckBoxExample();
        jc.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}
